#include <bits/stdc++.h>

using namespace std;

class Solution {
public:
    char repeatedCharacter(string s) 
    {
        int hash[26] = {0};
        for (auto e : s)
        {
            if (++hash[e - 'a'] > 1)
            {
                return e;
            }
        }
        return 0;
    }
};